package com.example.mybatisdemo.domain.returns;

/**
* @author jdcity-generator
* @version V1.0.0
* @description:  返回枚举
* @date 2021/03/16 11:04
* @copyright Copyright 智能城市icity.jd.com ALL Right Reserved
*/
public enum RespCode {
    /**
     * 错误码枚举
     */
    SUCCESS(0,"成功"),
    NO_LOGIN(101,"用户未登录"),
    SERVER_ERROR(10000,"系统异常"),
    FREQ_REQ_ERROR(10001,"请求过于频繁"),
    DATA_ERROR(20001,"数据错误"),
    PARAMETERS_ERROR(30001,"参数错误"),
    FILE_TOO_LARGE(30006,"上传文件过大"),
    NO_AUTHORITY(50001,"无访问权限"),
    UPLOAD_ERROR(60000,"批量导入失败"),
    BACK_UPPER_LIMIT(80000, "退回次数上限"),
    COUNTY_ERROR(10824, "区县系统异常"),
    UNKNOWN_ERROR(99999,"未定义错误类");
    /**
     * 错误码
     */
    private final Integer code;
    /**
     * 错误描述
     */
    private String message;

    private RespCode(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public Integer getCode(){
        return code;
    }

    public String getMessage(){
        return message;
    }

    public void setMessage(String message){
        this.message = message;
    }
}